production anymore. There is now $wgUseKeyHeader that provides similar
functionality but instead of the MediaWiki-specific X-Vary-Options header,
uses the draft Key header standard.
+* $wgScriptExtension (and support for '.php5' entry points) was removed. See the
+ deprecation notice in the release notes for version 1.25 for advice on how to
+ preserve support for '.php5' entry points via URL rewriting.
=== New features in 1.27 ===
* $wgDataCenterId and $wgDataCenterRoles where added, which will serve as
+++ /dev/null
-<?php
-/**
- * Version of api.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './api.php';
+++ /dev/null
-<?php
-/**
- * Version of img_auth.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './img_auth.php';
* This variable was provided to support those providers.
*
* @since 1.11
- * @deprecated since 1.25; support for '.php5' is being phased out of MediaWiki
+ * @deprecated since 1.25; support for '.php5' has been phased out of MediaWiki
* proper. Backward-compatibility can be maintained by configuring your web
* server to rewrite URLs. See RELEASE-NOTES for details.
*/
/**
* The URL path to index.php.
*
- * Defaults to "{$wgScriptPath}/index{$wgScriptExtension}".
+ * Defaults to "{$wgScriptPath}/index.php".
*/
$wgScript = false;
/**
* The URL path to load.php.
*
- * Defaults to "{$wgScriptPath}/load{$wgScriptExtension}".
+ * Defaults to "{$wgScriptPath}/load.php".
* @since 1.17
*/
$wgLoadScript = false;
* - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
* https://en.wikipedia.org/w
* - scriptExtension Script extension of the MediaWiki installation, equivalent to
- * $wgScriptExtension, e.g. .php5 defaults to .php
+ * $wgScriptExtension, e.g. ".php5". Defaults to ".php".
*
* - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
* - fetchDescription Fetch the text of the remote file description page. Equivalent to
*
* @par Example:
* @code
- * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb{$wgScriptExtension}";
+ * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
* @endcode
*/
$wgThumbnailScriptPath = false;
/**
* Get the path to a specified script file, respecting file
- * extensions; this is a wrapper around $wgScriptExtension etc.
+ * extensions; this is a wrapper around $wgScriptPath etc.
* except for 'index' and 'load' which use $wgScript/$wgLoadScript
*
* @param string $script Script filename, sans extension
* @return string
*/
function wfScript( $script = 'index' ) {
- global $wgScriptPath, $wgScriptExtension, $wgScript, $wgLoadScript;
+ global $wgScriptPath, $wgScript, $wgLoadScript;
if ( $script === 'index' ) {
return $wgScript;
} elseif ( $script === 'load' ) {
return $wgLoadScript;
} else {
- return "{$wgScriptPath}/{$script}{$wgScriptExtension}";
+ return "{$wgScriptPath}/{$script}.php";
}
}
$ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' );
if ( $wgScript === false ) {
- $wgScript = "$wgScriptPath/index$wgScriptExtension";
+ $wgScript = "$wgScriptPath/index.php";
}
if ( $wgLoadScript === false ) {
- $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
+ $wgLoadScript = "$wgScriptPath/load.php";
}
if ( $wgArticlePath === false ) {
'name' => 'local',
'directory' => $wgUploadDirectory,
'scriptDirUrl' => $wgScriptPath,
- 'scriptExtension' => $wgScriptExtension,
+ 'scriptExtension' => '.php',
'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
'thumbScriptUrl' => $wgThumbnailScriptPath,
$ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
-if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) {
- wfWarn( 'Script extensions other than ".php" are deprecated.' );
-}
-
if ( $wgCanonicalServer === false ) {
$wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
}
* @return bool
*/
public function checkUrlExtension( $extWhitelist = array() ) {
- global $wgScriptExtension;
- $extWhitelist[] = ltrim( $wgScriptExtension, '.' );
+ $extWhitelist[] = 'php';
if ( IEUrlExtension::areServerVarsBad( $_SERVER, $extWhitelist ) ) {
if ( !$this->wasPosted() ) {
$newUrl = IEUrlExtension::fixUrlForIE6(
protected $scriptDirUrl;
/** @var string Script extension of the MediaWiki installation, equivalent
- * to $wgScriptExtension, e.g. .php5 defaults to .php */
+ * to the old $wgScriptExtension, e.g. .php5 defaults to .php */
protected $scriptExtension;
/** @var string Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1 */
}
public function showDoneMessage() {
- global $wgScriptExtension;
-
$this->startForm();
$regenerate = !$this->getVar( '_ExistingDBSettings' );
if ( $regenerate ) {
$this->parent->getInfoBox(
wfMessage( $msg,
$this->getVar( 'wgServer' ) .
- $this->getVar( 'wgScriptPath' ) . '/index' .
- $wgScriptExtension
+ $this->getVar( 'wgScriptPath' ) . '/index.php'
)->plain(), 'tick-32.png'
)
);
'wgUrlProtocols' => wfUrlProtocols(),
'wgArticlePath' => $conf->get( 'ArticlePath' ),
'wgScriptPath' => $conf->get( 'ScriptPath' ),
- 'wgScriptExtension' => $conf->get( 'ScriptExtension' ),
+ 'wgScriptExtension' => '.php',
'wgScript' => wfScript(),
'wgSearchType' => $conf->get( 'SearchType' ),
'wgVariantArticlePath' => $conf->get( 'VariantArticlePath' ),
+++ /dev/null
-<?php
-/**
- * Version of index.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './index.php';
+++ /dev/null
-<?php
-/**
- * Version of load.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './load.php';
+++ /dev/null
-<?php
-/**
- * Version of opensearch_desc.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './opensearch_desc.php';
+++ /dev/null
-<?php
-/**
- * Version of profileinfo.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './profileinfo.php';
} else if ( str === 'load' ) {
return mw.config.get( 'wgLoadScript' );
} else {
- return mw.config.get( 'wgScriptPath' ) + '/' + str +
- mw.config.get( 'wgScriptExtension' );
+ return mw.config.get( 'wgScriptPath' ) + '/' + str + '.php';
}
},
mw.config.set( {
wgScript: '/w/i.php', // customized wgScript for bug 39103
wgLoadScript: '/w/l.php', // customized wgLoadScript for bug 39103
- wgScriptPath: '/w',
- wgScriptExtension: '.php'
+ wgScriptPath: '/w'
} );
assert.equal( mw.util.wikiScript(), mw.config.get( 'wgScript' ),
+++ /dev/null
-<?php
-/**
- * Version of thumb.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Media
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './thumb.php';
+++ /dev/null
-<?php
-/**
- * Version of thumb_handler.php to be used in web servers that require the .php5
- * extension to execute scripts with the PHP5 engine.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Media
- */
-
-define( 'MW_ENTRY_PHP5', true );
-
-require './thumb_handler.php';